import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Formatter;
import java.util.logging.LogRecord;
import java.util.logging.Logger;

public class Main {

	public static Logger logger;
	
	static {
		try {
			boolean append = true;
			FileHandler fh = new FileHandler("TestLog.log", append);
			fh.setFormatter(new Formatter() {
				public String format(LogRecord rec) {
					StringBuffer buf = new StringBuffer(1000);
//					buf.append(new java.util.Date());
//					buf.append(' ');
					buf.append(rec.getLevel());
					buf.append(' ');
					buf.append(formatMessage(rec));
					buf.append('\n');
					return buf.toString();
				}
			});
			logger = Logger.getLogger("TestLog");
			logger.addHandler(fh);
		}
		catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Fenetre fen = new Fenetre("a") ;
		enJeu[] tab = new enJeu[fen.getTaille()];
		
		for (int a = 0 ; a < fen.getTaille() ; a++){
			tab[a] = new enJeu(fen.getX(a),fen.getY(a), a,75,150) ;
		}
		for (int b = 0 ; b < fen.getTaille() ; b++){
			tab[b].start();
		}
	}

}
